﻿using SimpleJSON;

public static class ReportType
{
    public static string GameStart = "";
    public static string GameShut = "";
    public static string FrameworkInit = "";
    public static string FrameworkInitFinish = "";
    public static string ModuleInit = "";
    public static string ModuleInitFinish = "";
    public static string InitLoadModule = "";
    public static string InitLoadModuleFinish = "";
    public static string StartGame = "";
    public static string StartLuaState = "";
    public static string LoadLuaPackage = "";
    public static string StartLuaMain = "";
}

public class SDKReportHelper
{
    public static void DoReport(string id, JSONClass json = null)
    {
        //Debuger.Log("SDKReport {0}", id);
        if (json == null)
        {
            json = new JSONClass();
        }

        if (json.Count == 0)
        {
            json.Add("result", new JSONData(0));
        }

        string msg = json.ToString("");
        NativeAgent.LogEvent(id, msg);
    }
}